package com.ss.android.wenda.c;

import android.content.res.Resources;
import android.support.design.a;
import android.view.View;
import android.widget.TextView;

import com.ss.android.article.browser.R;
import com.ss.android.k.d.c;
import com.ss.android.k.dd;
import com.ss.android.wenda.model.Question;

public final class i extends dd {
    String c;
    String d;

    public i(String arg1, String arg2) {

        this.c = arg1;
        this.d = arg2;
    }

    public final void a(Object arg6) {
        if((arg6 instanceof Question)) {
            Resources v0 = this.a().getResources();
            int v1 = this.a().getId();
            if(v1 == R.id.folder_answer_tv_container) {
                this.c().d(0).a(new j(this, ((Question)arg6)));
            }

            if(v1 == R.id.folder_answer_tv) {
                StringBuilder v1_1 = new StringBuilder().append(((Question)arg6).mNormalAnswerCount);
                com.ss.android.wenda.a.i v0_1 = com.ss.android.wenda.a.i.a();
                String v0_2 = v0_1.a == null ? "个回答被折叠" : v0_1.a.optString("list_more_answer_count_text", "个回答被折叠");
                this.c().d(0).a(v1_1.append(v0_2).toString());
                return;
            }

            if(v1 == R.id.fold_reason_layout) {
                if(((Question)arg6).mAnswerFoldReason != null && !a.isTextEmpty(((Question)arg6).mAnswerFoldReason.mTitle)) {
                    View v0_3 = this.c().a(com.ss.android.article.browser.R.id.fold_reason_tv);
                    ((TextView)v0_3).setText(((Question)arg6).mAnswerFoldReason.mTitle);
                    ((TextView)v0_3).setOnClickListener(new k(((Question)arg6)));
                    return;
                }

                this.c().d(8);
                return;
            }

            if(v1 != R.id.fold_reason_top_divider) {
                return;
            }

            c v1_2 = this.c();
            int v0_4 = v0.getColor(com.ss.android.article.browser.R.color.ssxinxian1);
            if(v1_2.a == null) {
                return;
            }

            v1_2.a.setBackgroundColor(v0_4);
        }
    }
}

